import { cloneDeep, } from 'lodash-es';

let operlogList: OperlogRecord[] = [
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 151,
    "title": "岗位管理",
    "businessType": 5,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysPostController.export()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/post/export",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"pageSize\":\"10\",\"pageNum\":\"1\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 21:59:08",
    "costTime": 66
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 150,
    "title": "岗位管理",
    "businessType": 5,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysPostController.export()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/post/export",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"pageSize\":\"10\",\"pageNum\":\"1\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 20:08:25",
    "costTime": 656
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 149,
    "title": "菜单管理",
    "businessType": 3,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.remove()",
    "requestMethod": "DELETE",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu/1000",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{}",
    "jsonResult": "{\"msg\":\"菜单已分配,不允许删除\",\"code\":601}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 17:56:39",
    "costTime": 7
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 148,
    "title": "菜单管理",
    "businessType": 3,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.remove()",
    "requestMethod": "DELETE",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu/100",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{}",
    "jsonResult": "{\"msg\":\"存在子菜单,不允许删除\",\"code\":601}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 17:56:25",
    "costTime": 4
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 147,
    "title": "角色管理",
    "businessType": 4,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysRoleController.selectAuthUserAll()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/role/authUser/selectAll",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"roleId\":\"2\",\"userIds\":\"21,22,23,24,25,26,27,28,29,30\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 16:47:03",
    "costTime": 6
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 146,
    "title": "角色管理",
    "businessType": 4,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysRoleController.selectAuthUserAll()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/role/authUser/selectAll",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"roleId\":\"2\",\"userIds\":\"1\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 16:27:25",
    "costTime": 30
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 145,
    "title": "角色管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysRoleController.dataScope()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/role/dataScope",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"admin\":false,\"createTime\":\"2024-07-07 17:41:52\",\"dataScope\":\"2\",\"delFlag\":\"0\",\"deptCheckStrictly\":true,\"deptIds\":[100,101,103,104,105,106,107,102,108,109],\"flag\":false,\"menuCheckStrictly\":true,\"params\":{},\"remark\":\"普通角色\",\"roleId\":2,\"roleKey\":\"common\",\"roleName\":\"普通角色\",\"roleSort\":2,\"status\":\"0\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 16:08:41",
    "costTime": 22
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 144,
    "title": "角色管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysRoleController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/role",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"admin\":false,\"createTime\":\"2024-07-07 17:41:52\",\"dataScope\":\"2\",\"delFlag\":\"0\",\"deptCheckStrictly\":true,\"flag\":false,\"menuCheckStrictly\":true,\"menuIds\":[1,100,1000,1001,1002,1003,1004,1005,1006,2000,101,1007,1008,1009,1010,1011,2001,102,1012,1013,1014,1015,103,1016,1017,1018,1019,104,1020,1021,1022,1023,1024,105,1025,1026,1027,1028,1029,2002,106,1030,1031,1032,1033,1034,107,1035,1036,1037,1038,2003,2,108,500,1039,1040,1041,501,1042,1043,1044,1045,109,1046,1047,1048,110,1049,1050,1051,1052,1053,1054,111,112,113,114,3,116,1055,1056,1057,1058,1059,1060,2004,2005,117,2006,2007],\"params\":{},\"remark\":\"普通角色\",\"roleId\":2,\"roleKey\":\"common\",\"roleName\":\"普通角色\",\"roleSort\":2,\"status\":\"0\",\"updateBy\":\"admin\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-10 16:05:32",
    "costTime": 58
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 143,
    "title": "菜单管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"children\":[],\"component\":\"system/notice/index\",\"createTime\":\"2024-07-07 17:41:52\",\"icon\":\"message\",\"isCache\":\"0\",\"isFrame\":\"1\",\"menuId\":107,\"menuName\":\"通知公告\",\"menuType\":\"C\",\"orderNum\":9,\"params\":{},\"parentId\":1,\"path\":\"notice\",\"perms\":\"system:notice:list\",\"query\":\"\",\"status\":\"0\",\"updateBy\":\"admin\",\"visible\":\"0\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-09 20:28:38",
    "costTime": 7
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 142,
    "title": "菜单管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"children\":[],\"component\":\"system/notice/index\",\"createTime\":\"2024-07-07 17:41:52\",\"icon\":\"message\",\"isCache\":\"0\",\"isFrame\":\"1\",\"menuId\":107,\"menuName\":\"通知公告\",\"menuType\":\"C\",\"orderNum\":1,\"params\":{},\"parentId\":108,\"path\":\"notice\",\"perms\":\"system:notice:list\",\"query\":\"\",\"status\":\"0\",\"updateBy\":\"admin\",\"visible\":\"0\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-09 20:28:07",
    "costTime": 7
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 141,
    "title": "菜单管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"children\":[],\"component\":\"\",\"createTime\":\"2024-07-07 17:41:52\",\"icon\":\"log\",\"isCache\":\"0\",\"isFrame\":\"1\",\"menuId\":108,\"menuName\":\"日志管理\",\"menuType\":\"M\",\"orderNum\":1,\"params\":{},\"parentId\":2,\"path\":\"log\",\"perms\":\"\",\"query\":\"\",\"status\":\"0\",\"updateBy\":\"admin\",\"visible\":\"0\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-09 20:27:37",
    "costTime": 20
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 140,
    "title": "菜单管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"children\":[],\"component\":\"system/notice/index\",\"createTime\":\"2024-07-07 17:41:52\",\"icon\":\"message\",\"isCache\":\"0\",\"isFrame\":\"1\",\"menuId\":107,\"menuName\":\"通知公告\",\"menuType\":\"C\",\"orderNum\":1,\"params\":{},\"parentId\":2,\"path\":\"notice\",\"perms\":\"system:notice:list\",\"query\":\"\",\"status\":\"0\",\"updateBy\":\"admin\",\"visible\":\"0\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-09 20:27:06",
    "costTime": 33
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 139,
    "title": "用户管理",
    "businessType": 5,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysUserController.export()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/user/export",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"pageSize\":\"10\",\"pageNum\":\"1\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-08 19:36:14",
    "costTime": 678
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 138,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:46:52",
    "costTime": 141
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 137,
    "title": "代码生成",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.editSave()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"businessName\":\"mallUser\",\"className\":\"MallUser\",\"columns\":[{\"capJavaField\":\"UserId\",\"columnComment\":\"Id\",\"columnId\":31,\"columnName\":\"userId\",\"columnType\":\"int(11)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":false,\"htmlType\":\"input\",\"increment\":true,\"insert\":true,\"isIncrement\":\"1\",\"isInsert\":\"1\",\"isPk\":\"1\",\"isRequired\":\"0\",\"javaField\":\"userId\",\"javaType\":\"Long\",\"list\":false,\"params\":{},\"pk\":true,\"query\":false,\"queryType\":\"EQ\",\"required\":false,\"sort\":1,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"updateTime\":\"2024-07-07 22:42:50\",\"usableColumn\":false},{\"capJavaField\":\"UserName\",\"columnComment\":\"名字\",\"columnId\":32,\"columnName\":\"userName\",\"columnType\":\"varchar(100)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userName\",\"javaType\":\"String\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"LIKE\",\"required\":true,\"sort\":2,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"updateTime\":\"2024-07-07 22:42:50\",\"usableColumn\":false},{\"capJavaField\":\"UserAge\",\"columnComment\":\"年龄\",\"columnId\":33,\"columnName\":\"userAge\",\"columnType\":\"int(255)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userAge\",\"javaType\":\"Long\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"EQ\",\"required\":true,\"sort\":3,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"updateTime\":\"2024-07-07 22:42:50\",\"usableColumn\":false},{\"capJavaField\":\"UserSex\",\"columnComment\":\"性别\",\"columnId\":34,\"columnName\":\"userSex\",\"columnType\":\"char(1)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"select\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\"",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:46:50",
    "costTime": 48
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 136,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:43:14",
    "costTime": 35
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 135,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:42:53",
    "costTime": 135
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 134,
    "title": "代码生成",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.editSave()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"businessName\":\"user\",\"className\":\"MallUser\",\"columns\":[{\"capJavaField\":\"UserId\",\"columnComment\":\"Id\",\"columnId\":31,\"columnName\":\"userId\",\"columnType\":\"int(11)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":false,\"htmlType\":\"input\",\"increment\":true,\"insert\":true,\"isIncrement\":\"1\",\"isInsert\":\"1\",\"isPk\":\"1\",\"isRequired\":\"0\",\"javaField\":\"userId\",\"javaType\":\"Long\",\"list\":false,\"params\":{},\"pk\":true,\"query\":false,\"queryType\":\"EQ\",\"required\":false,\"sort\":1,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserName\",\"columnComment\":\"名字\",\"columnId\":32,\"columnName\":\"userName\",\"columnType\":\"varchar(100)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userName\",\"javaType\":\"String\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"LIKE\",\"required\":true,\"sort\":2,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserAge\",\"columnComment\":\"年龄\",\"columnId\":33,\"columnName\":\"userAge\",\"columnType\":\"int(255)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userAge\",\"javaType\":\"Long\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"EQ\",\"required\":true,\"sort\":3,\"superColumn\":false,\"tableId\":4,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserSex\",\"columnComment\":\"性别\",\"columnId\":34,\"columnName\":\"userSex\",\"columnType\":\"char(1)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 22:42:30\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"select\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userSex",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:42:50",
    "costTime": 41
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 133,
    "title": "代码生成",
    "businessType": 6,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.importTableSave()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/importTable",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:42:30",
    "costTime": 54
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 132,
    "title": "代码生成",
    "businessType": 3,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.remove()",
    "requestMethod": "DELETE",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/3",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:42:25",
    "costTime": 33
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 131,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:35:18",
    "costTime": 39
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 130,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 22:35:15",
    "costTime": 167
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 129,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 21:31:42",
    "costTime": 157
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 128,
    "title": "代码生成",
    "businessType": 8,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.batchGenCode()",
    "requestMethod": "GET",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/batchGenCode",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": null,
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 21:10:14",
    "costTime": 37
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 127,
    "title": "代码生成",
    "businessType": 3,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.remove()",
    "requestMethod": "DELETE",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/2",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 21:08:44",
    "costTime": 13
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 126,
    "title": "代码生成",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.editSave()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"businessName\":\"user\",\"className\":\"MallUser\",\"columns\":[{\"capJavaField\":\"UserId\",\"columnComment\":\"Id\",\"columnId\":23,\"columnName\":\"userId\",\"columnType\":\"int(11)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 20:36:23\",\"dictType\":\"\",\"edit\":false,\"htmlType\":\"input\",\"increment\":true,\"insert\":true,\"isEdit\":\"0\",\"isIncrement\":\"1\",\"isInsert\":\"1\",\"isList\":\"0\",\"isPk\":\"1\",\"isQuery\":\"0\",\"isRequired\":\"0\",\"javaField\":\"userId\",\"javaType\":\"Long\",\"list\":false,\"params\":{},\"pk\":true,\"query\":false,\"queryType\":\"EQ\",\"required\":false,\"sort\":1,\"superColumn\":false,\"tableId\":3,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserName\",\"columnComment\":\"名字\",\"columnId\":24,\"columnName\":\"userName\",\"columnType\":\"varchar(100)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 20:36:23\",\"dictType\":\"\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userName\",\"javaType\":\"String\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"LIKE\",\"required\":true,\"sort\":2,\"superColumn\":false,\"tableId\":3,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserAge\",\"columnComment\":\"年龄\",\"columnId\":25,\"columnName\":\"userAge\",\"columnType\":\"int(255)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 20:36:23\",\"edit\":true,\"htmlType\":\"input\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\",\"isRequired\":\"1\",\"javaField\":\"userAge\",\"javaType\":\"Long\",\"list\":true,\"params\":{},\"pk\":false,\"query\":true,\"queryType\":\"EQ\",\"required\":true,\"sort\":3,\"superColumn\":false,\"tableId\":3,\"updateBy\":\"\",\"usableColumn\":false},{\"capJavaField\":\"UserSex\",\"columnComment\":\"性别\",\"columnId\":26,\"columnName\":\"userSex\",\"columnType\":\"char(1)\",\"createBy\":\"admin\",\"createTime\":\"2024-07-07 20:36:23\",\"dictType\":\"sys_user_sex\",\"edit\":true,\"htmlType\":\"select\",\"increment\":false,\"insert\":true,\"isEdit\":\"1\",\"isIncrement\":\"0\",\"isInsert\":\"1\",\"isList\":\"1\",\"isPk\":\"0\",\"isQuery\":\"1\"",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 21:08:40",
    "costTime": 39
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 125,
    "title": "代码生成",
    "businessType": 6,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.importTableSave()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/importTable",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"mall_user\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 20:36:23",
    "costTime": 101
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 124,
    "title": "代码生成",
    "businessType": 6,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.importTableSave()",
    "requestMethod": "POST",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/importTable",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"tables\":\"sys_job\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 19:40:18",
    "costTime": 69
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 123,
    "title": "代码生成",
    "businessType": 3,
    "businessTypes": null,
    "method": "com.bige.generator.controller.GenController.remove()",
    "requestMethod": "DELETE",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/tool/gen/1",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 19:40:08",
    "costTime": 31
  },
  {
    "createBy": null,
    "createTime": null,
    "updateBy": null,
    "updateTime": null,
    "remark": null,
    "operId": 122,
    "title": "菜单管理",
    "businessType": 2,
    "businessTypes": null,
    "method": "com.bige.web.controller.system.SysMenuController.edit()",
    "requestMethod": "PUT",
    "operatorType": 1,
    "operName": "admin",
    "deptName": "研发部门",
    "operUrl": "/system/menu",
    "operIp": "127.0.0.1",
    "operLocation": "内网IP",
    "operParam": "{\"children\":[],\"component\":\"system/role/authUser\",\"createTime\":\"2024-07-07 18:16:49\",\"icon\":\"peoples\",\"isCache\":\"1\",\"isFrame\":\"1\",\"menuId\":2001,\"menuName\":\"分配用户\",\"menuType\":\"C\",\"orderNum\":2,\"params\":{},\"parentId\":1,\"path\":\"role/auth-user/:roleId\",\"perms\":\"system:role:edit\",\"routeName\":\"\",\"status\":\"0\",\"updateBy\":\"admin\",\"visible\":\"1\"}",
    "jsonResult": "{\"msg\":\"操作成功\",\"code\":200}",
    "status": 0,
    "errorMsg": null,
    "operTime": "2024-07-07 18:32:57",
    "costTime": 9
  }
];

const mocks: MockRecord[] = [
  {
    method: "get",
    url: "/api/monitor/operlog/list",
    response(option) {
      const copyList = cloneDeep(operlogList);

      let resList = operlogList;

      if (option.query.pageNum) {
        resList = copyList.splice((option.query.pageNum - 1) * option.query.pageSize, option.query.pageSize);
      }

      const resData: responseType = {
        code: 200,
        msg: "查询成功",
        total: operlogList.length,
        ...(option.query.pageNum ? { rows: resList } : { data: resList })
      }

      return resData;
    }
  },
  {
    method: "get",
    url: "/api/monitor/operlog/:operId",
    response(option) {
      const resOperlog = operlogList.find(item => item.operId == option.query.operId);

      const resData: responseType = {
        code: resOperlog ? 200 : 500,
        msg: resOperlog ? "查询成功" : "查询失败",
        data: resOperlog,
      }

      return resData;
    }
  },
  {
    method: "post",
    url: "/api/monitor/operlog",
    response(option) {
      const newOperlog = option.body;

      newOperlog.operId = operlogList.length + 1;
      operlogList.unshift(newOperlog);

      const resData: responseType = {
        code: 200,
        msg: "新增成功",
      }

      return resData;
    }
  },
  {
    method: "put",
    url: "/api/monitor/operlog",
    response(option) {
      const newOperlog = option.body;

      const index = operlogList.findIndex(item => item.operId == newOperlog.operId);

      operlogList.splice(index, 1, newOperlog);

      const resData: responseType = {
        code: 200,
        msg: "修改成功",
      }

      return resData;
    }
  },
  {
    method: "delete",
    url: "/api/monitor/operlog/:operIds",
    response(option) {
      const operIds = option.query.operIds.split(',');

      const filterList = operlogList.filter(item => !operIds.includes(String(item.operId)));

      operlogList = filterList;

      const resData: responseType = {
        code: 200,
        msg: "删除成功",
      }
      return resData;
    }
  }
];

export default mocks;